home *** CD-ROM | disk | FTP | other *** search
/ PD ROM 1 / PD ROM Volume I - Macintosh Software from BMUG (1988).iso / Stacks / Hyper Education / Organizational Aids / ReportCard / ReportCard Stack / card_51030.txt < prev    next >
Encoding:
Text File  |  1988-04-19  |  11.8 KB  |  522 lines

  1. -- card: 51030 from stack: in
  2. -- bmap block id: 3699
  3. -- flags: 4000
  4. -- background id: 2606
  5. -- name: START
  6. ----- HyperTalk script -----
  7. HIDE MENUBAR
  8.  
  9.  
  10. -- part 2 (button)
  11. -- low flags: 00
  12. -- high flags: 0003
  13. -- rect: left=96 top=147 right=181 bottom=174
  14. -- title width / last selected line: 0
  15. -- icon id / first selected line: 20186 / 20186
  16. -- text alignment: 1
  17. -- font id: 0
  18. -- text size: 12
  19. -- style flags: 0
  20. -- line height: 16
  21. -- part name: sort
  22. ----- HyperTalk script -----
  23. Global tempA
  24. global tempB
  25. Global tempC
  26. Global startcard
  27. on mouseUp
  28.   answer "Sort all cards of this stack according to:" with "Name" or "I.D." or "Cancel"
  29.   if it is "Name" then
  30.     sort by first word of first line of field "Last"
  31.     exit mouseUp
  32.   end if
  33.   if it is "i.d." then
  34.     sort by field 3
  35.   end if
  36.   if it is "Cancel" then
  37.     exit mouseUp
  38.   end if
  39.   repeat with startcard = 3 to the number of cards
  40.     GO TO CARD STARTCARD
  41.     get field 3
  42.     put it into tempA
  43.     go to next card
  44.     get field 3
  45.     put it into tempB
  46.     go to next card
  47.     get field 3
  48.     put it into tempC
  49.     if tempA = tempB then
  50.       domenu "delete card"
  51.       beep 1
  52.     end if
  53.     if tempb = tempC then
  54.       domenu "delete card"
  55.       beep 1
  56.     end if
  57.     go to card startcard
  58.   end repeat
  59.   go to card 1
  60.   beep 5
  61. end mouseUp
  62.  
  63.  
  64.  
  65. -- part 3 (button)
  66. -- low flags: 00
  67. -- high flags: 0000
  68. -- rect: left=292 top=301 right=324 bottom=317
  69. -- title width / last selected line: 0
  70. -- icon id / first selected line: 1013 / 1013
  71. -- text alignment: 1
  72. -- font id: 0
  73. -- text size: 12
  74. -- style flags: 0
  75. -- line height: 16
  76. -- part name: Next
  77. ----- HyperTalk script -----
  78. on mouseUp
  79.   go to next card
  80. end mouseUp
  81.  
  82.  
  83.  
  84. -- part 5 (button)
  85. -- low flags: 00
  86. -- high flags: 0000
  87. -- rect: left=194 top=302 right=325 bottom=220
  88. -- title width / last selected line: 0
  89. -- icon id / first selected line: 1014 / 1014
  90. -- text alignment: 1
  91. -- font id: 0
  92. -- text size: 12
  93. -- style flags: 0
  94. -- line height: 16
  95. -- part name: 
  96. ----- HyperTalk script -----
  97. on mouseUp
  98.   go to prev card
  99. end mouseUp
  100.  
  101.  
  102.  
  103. -- part 6 (button)
  104. -- low flags: 00
  105. -- high flags: 8003
  106. -- rect: left=224 top=115 right=130 bottom=408
  107. -- title width / last selected line: 0
  108. -- icon id / first selected line: 0 / 0
  109. -- text alignment: 1
  110. -- font id: 0
  111. -- text size: 12
  112. -- style flags: 0
  113. -- line height: 16
  114. -- part name: Add New Student Card
  115. ----- HyperTalk script -----
  116. on mouseUp
  117.   GO TO CARD five
  118.   DOMENU "NEW CARD"
  119. end mouseUp
  120.  
  121.  
  122.  
  123.  
  124. -- part 7 (button)
  125. -- low flags: 00
  126. -- high flags: 0003
  127. -- rect: left=94 top=187 right=215 bottom=177
  128. -- title width / last selected line: 0
  129. -- icon id / first selected line: 32670 / 32670
  130. -- text alignment: 1
  131. -- font id: 0
  132. -- text size: 12
  133. -- style flags: 0
  134. -- line height: 16
  135. -- part name: 
  136. ----- HyperTalk script -----
  137. on mouseUp
  138.   show all cards
  139. end mouseUp
  140.  
  141.  
  142.  
  143. -- part 8 (button)
  144. -- low flags: 00
  145. -- high flags: 8003
  146. -- rect: left=224 top=81 right=98 bottom=405
  147. -- title width / last selected line: 0
  148. -- icon id / first selected line: 0 / 0
  149. -- text alignment: 1
  150. -- font id: 0
  151. -- text size: 12
  152. -- style flags: 0
  153. -- line height: 16
  154. -- part name: New Set Of Student Cards
  155. ----- HyperTalk script -----
  156. Global Subj
  157. Global Num
  158. Global Data
  159. Global Y -- THE NUMBER OF CHARS
  160. Global Sub --THE NAME OF THE ROW IN A SPREADSHEET
  161. Global Fname
  162. Global Hold
  163. Global subject1
  164. Global subject2
  165. Global subject3
  166. Global subject4
  167. Global subject5
  168. Global subject6
  169. Global subject7
  170. Global subject8
  171. Global subject9
  172. Global subject10
  173. on mouseUp
  174.   GET FIELD 1 OF CARD 4
  175.   PUT IT INTO SUBJECT1
  176.   GET FIELD 2 OF CARD 4
  177.   PUT IT INTO SUBJECT2
  178.   GET FIELD 3 OF CARD 4
  179.   PUT IT INTO SUBJECT3
  180.   GET FIELD 4 OF CARD 4
  181.   PUT IT INTO SUBJECT4
  182.   GET FIELD 5 OF CARD 4
  183.   PUT IT INTO SUBJECT5
  184.   GET FIELD 6 OF CARD 4
  185.   PUT IT INTO SUBJECT6
  186.   GET FIELD 7 OF CARD 4
  187.   PUT IT INTO SUBJECT7
  188.   GET FIELD 8 OF CARD 4
  189.   PUT IT INTO SUBJECT8
  190.   GET FIELD 9 OF CARD 4
  191.   PUT IT INTO SUBJECT9
  192.   GET FIELD 10 OF CARD 4
  193.   PUT IT INTO SUBJECT10
  194.   ask "Enter name of file to import. " with "GRADES"
  195.   put it into Fname
  196.   open file Fname
  197.   read from file Fname until return
  198.   repeat
  199.     put " " into y
  200.     repeat
  201.       read from file Fname until return
  202.       beep 1
  203.       put the number of chars in it into y
  204.       If char 1 of it = "" then
  205.         beep 9
  206.         close file Fname
  207.         answer "END OF STUDENT DATA !" WITH "OK"
  208.         exit mouseUp
  209.       end if
  210.       put it into Data
  211.       if y < 3 then exit repeat
  212.       put offset(tab,Data) into num --gets first field (until tab)
  213.       put char 1 to (num ) of data into subj
  214.       -- these lines are to test for a subject
  215.       PUT SUBJ INTO IT
  216.       if SUBJ contains SUBJECT1 then put "yes" into IT
  217.       if SUBJ contains SUBJECT2 then put "yes" into IT
  218.       if SUBJ contains SUBJECT3 then put "yes" into IT
  219.       if SUBJ contains SUBJECT4 then put "yes" into IT
  220.       if SUBJ contains SUBJECT5 then put "yes" into IT
  221.       if SUBJ contains SUBJECT6 then put "yes" into IT
  222.       if SUBJ contains SUBJECT7 then put "yes" into IT
  223.       if SUBJ contains SUBJECT8 then put "yes" into IT
  224.       if SUBJ contains SUBJECT9 then put "yes" into IT
  225.       if SUBJ contains SUBJECT10 then put "yes" into IT
  226.       if IT = "yes" then
  227.         ask "Make new cards for this subject ? " with subj
  228.         if it is subj then
  229.           go to card FIVE -- card to copy
  230.           repeat
  231.             read from file Fname until return -- get record to process
  232.             put it into Data
  233.             put offset(tab,Data) into num --gets first field (until tab)
  234.             put the number of chars in it into y
  235.             put char 1 to (num ) of data into subj
  236.             if y < 3 then exit repeat
  237.             if SUBJ contains SUBJECT1 then exit repeat
  238.             if SUBJ contains SUBJECT2 then exit repeat
  239.             if SUBJ contains SUBJECT3 then exit repeat
  240.             if SUBJ contains SUBJECT4 then exit repeat
  241.             if SUBJ contains SUBJECT5 then exit repeat
  242.             if SUBJ contains SUBJECT6 then exit repeat
  243.             if SUBJ contains SUBJECT7 then exit repeat
  244.             if SUBJ contains SUBJECT8 then exit repeat
  245.             if SUBJ contains SUBJECT9 then exit repeat
  246.             if SUBJ contains SUBJECT10 then exit repeat
  247.             domenu "new card"
  248.             if num <> 0 then
  249.               put char 1 to (num-1 ) of data into field 1
  250.               delete char 1 to num of data
  251.               put offset(tab,Data) into num --gets second field (until tab) end point
  252.             end if
  253.             if num <> 0 then
  254.               put char 1 to (num-1 ) of data into field 2
  255.               delete char 1 to num of data
  256.               put offset(tab,Data) into num --gets third field (until tab) end point
  257.             end if
  258.             if num <> 0 then
  259.               put char 1 to (num-1 ) of data into field 3
  260.               delete char 1 to num of data
  261.               put "no" into hold
  262.             end if
  263.           end repeat
  264.         end if
  265.         if it <> subj then
  266.           put "  " into subj
  267.           exit repeat
  268.         end if
  269.       end if
  270.     end repeat
  271.   end repeat
  272.   close file Fname
  273. end mouseUp
  274.  
  275.  
  276.  
  277.  
  278. -- part 9 (button)
  279. -- low flags: 00
  280. -- high flags: 8003
  281. -- rect: left=222 top=143 right=160 bottom=408
  282. -- title width / last selected line: 0
  283. -- icon id / first selected line: 0 / 0
  284. -- text alignment: 1
  285. -- font id: 0
  286. -- text size: 12
  287. -- style flags: 0
  288. -- line height: 16
  289. -- part name: Auto Import All Cards
  290. ----- HyperTalk script -----
  291. on mouseUp
  292.   repeat with x = 6 to the number of cards
  293.     go to card x
  294.     get location of background button 1
  295.     click at it
  296.     beep 1
  297.   end repeat
  298. end mouseUp
  299.  
  300.  
  301.  
  302. -- part 10 (button)
  303. -- low flags: 00
  304. -- high flags: 8003
  305. -- rect: left=228 top=239 right=256 bottom=411
  306. -- title width / last selected line: 0
  307. -- icon id / first selected line: 0 / 0
  308. -- text alignment: 1
  309. -- font id: 0
  310. -- text size: 12
  311. -- style flags: 0
  312. -- line height: 16
  313. -- part name: Print Selected Cards
  314. ----- HyperTalk script -----
  315. on mouseUp
  316.  
  317.   global y
  318.   global z
  319.   ask "What is the number of the first card to print ? " with y
  320.   put it into y
  321.   ask "what is the number of the last card to print ? "  with z
  322.   put it into z
  323.   repeat with count  = y to z
  324.     go to card y
  325.     domenu "print card"
  326.     put y + 1 into y
  327.   end repeat
  328. end mouseUp
  329.  
  330.  
  331.  
  332. -- part 11 (button)
  333. -- low flags: 00
  334. -- high flags: 8003
  335. -- rect: left=225 top=173 right=189 bottom=409
  336. -- title width / last selected line: 0
  337. -- icon id / first selected line: 0 / 0
  338. -- text alignment: 1
  339. -- font id: 0
  340. -- text size: 12
  341. -- style flags: 0
  342. -- line height: 16
  343. -- part name: Delete Student Cards
  344. ----- HyperTalk script -----
  345. GLOBAL NUM
  346. GLOBAL CNAME
  347. on mouseUp
  348.   GO TO CARD 6
  349.   REPEAT
  350.     get the name of this card
  351.     put it into Cname
  352.  
  353.     IF CNAME CONTAINS "START" THEN
  354.       BEEP 1
  355.       EXIT REPEAT
  356.     END IF
  357.     IF CNAME CONTAINS "INSTRUCTIONS 1" THEN
  358.       BEEP 1
  359.       EXIT REPEAT
  360.     END IF
  361.     IF CNAME CONTAINS "INSTRUCTIONS 2" THEN
  362.       BEEP 1
  363.       EXIT REPEAT
  364.     END IF
  365.     IF CNAME CONTAINS "SAMPLE CARD" THEN
  366.       BEEP 1
  367.       EXIT REPEAT
  368.     END IF
  369.     IF CNAME CONTAINS "SUBJECT CARD" THEN
  370.       BEEP 1
  371.       EXIT REPEAT
  372.     END IF
  373.     DOMENU "DELETE CARD"
  374.  
  375.   END REPEAT
  376. end mouseUp
  377.  
  378.  
  379.  
  380. -- part 13 (button)
  381. -- low flags: 00
  382. -- high flags: 8003
  383. -- rect: left=227 top=207 right=225 bottom=412
  384. -- title width / last selected line: 0
  385. -- icon id / first selected line: 0 / 0
  386. -- text alignment: 1
  387. -- font id: 0
  388. -- text size: 12
  389. -- style flags: 0
  390. -- line height: 16
  391. -- part name: Quick Check a Student
  392. ----- HyperTalk script -----
  393. on mouseUp
  394.   Global Subj
  395.   Global num
  396.   Global Data
  397.   Global y
  398.   Global x
  399.   Global NAME
  400.   Global yes
  401.   put "" into mmm
  402.   open file grades
  403.   ask "Display grades for which Student ? " with NAME
  404.   if it = "" then
  405.     beep 3
  406.     close file grades
  407.     exit mouseUp
  408.   end if
  409.   PUT IT INTO NAME
  410.   repeat
  411.     read from file grades until return
  412.     beep 1
  413.     put the number of chars in it into y
  414.     If char 1 of it = "" then
  415.       beep 9
  416.       close file grades
  417.       answer "END OF STUDENT DATA !" WITH "OK"
  418.       exit mouseUp
  419.     end if
  420.     put it into Data
  421.     if data contains NAME then
  422.       show message box
  423.       put data into message box
  424.       wait 300
  425.       hide message box
  426.       answer "Check next set of grades for this student ? " with "Yes" or "no"
  427.       if it <> "yes" then
  428.         close file grades
  429.         exit mouseUp
  430.       end if
  431.     end if
  432.   end repeat
  433.   close file grades
  434. end mouseUp
  435.  
  436.  
  437.  
  438. -- part 15 (button)
  439. -- low flags: 00
  440. -- high flags: A000
  441. -- rect: left=14 top=53 right=102 bottom=98
  442. -- title width / last selected line: 0
  443. -- icon id / first selected line: 24617 / 24617
  444. -- text alignment: 1
  445. -- font id: 0
  446. -- text size: 12
  447. -- style flags: 0
  448. -- line height: 16
  449. -- part name: Microsoft Works
  450. ----- HyperTalk script -----
  451. On MouseUp -- Application
  452.   Global LongName
  453.   Put "FX-20:Works:Microsoft Works" into LongName
  454.   LaunchApplication
  455. End MouseUp
  456.  
  457. --
  458. -- FOR 'PORTFOLIO' TO FUNCTION CORRECTLY; DO NOT MODIFY THIS SCRIPT!
  459. --
  460.  
  461.  
  462.  
  463. -- part 16 (field)
  464. -- low flags: 00
  465. -- high flags: 0000
  466. -- rect: left=113 top=303 right=315 bottom=125
  467. -- title width / last selected line: 0
  468. -- icon id / first selected line: 0 / 0
  469. -- text alignment: 0
  470. -- font id: 3
  471. -- text size: 12
  472. -- style flags: 0
  473. -- line height: 16
  474. -- part name: 
  475.  
  476.  
  477. -- part 17 (field)
  478. -- low flags: 00
  479. -- high flags: 0000
  480. -- rect: left=113 top=304 right=316 bottom=125
  481. -- title width / last selected line: 0
  482. -- icon id / first selected line: 0 / 0
  483. -- text alignment: 0
  484. -- font id: 3
  485. -- text size: 12
  486. -- style flags: 0
  487. -- line height: 16
  488. -- part name: 
  489.  
  490.  
  491. -- part 18 (field)
  492. -- low flags: 00
  493. -- high flags: 0000
  494. -- rect: left=113 top=303 right=318 bottom=125
  495. -- title width / last selected line: 0
  496. -- icon id / first selected line: 0 / 0
  497. -- text alignment: 0
  498. -- font id: 3
  499. -- text size: 12
  500. -- style flags: 0
  501. -- line height: 16
  502. -- part name: 
  503.  
  504.  
  505. -- part 19 (button)
  506. -- low flags: 00
  507. -- high flags: 8003
  508. -- rect: left=80 top=246 right=268 bottom=180
  509. -- title width / last selected line: 0
  510. -- icon id / first selected line: 0 / 0
  511. -- text alignment: 1
  512. -- font id: 0
  513. -- text size: 12
  514. -- style flags: 0
  515. -- line height: 16
  516. -- part name: HELP PLEASE !
  517. ----- HyperTalk script -----
  518. on mouseUp
  519.   GO TO CARD 2
  520. end mouseUp
  521.  
  522.